<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: audio.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_12cda917fe1d7c8b4e7d2501bb3636e4.html">sdk</a></li><li class="navelem"><a class="el" href="dir_2f23e30b638d6a5f333babd9a5d183e1.html">include</a></li><li class="navelem"><a class="el" href="dir_d5ace589187da7c83c1a7507ec9fbbef.html">sifteo</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">audio.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This file is part of the public interface to the Sifteo SDK.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright &lt;c&gt; 2012 Sifteo, Inc. All rights reserved.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#ifdef NOT_USERSPACE</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#   error This is a userspace-only header, not allowed by the current build.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;sifteo/asset.h&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;sifteo/abi.h&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">namespace </span>Sifteo {</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html">   30</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_sifteo_1_1_audio_channel.html" title="One mixer channel, capable of playing AudioAssets.">AudioChannel</a> {</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    _SYSAudioChannelID sys;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keyword">typedef</span> _SYSAudioChannelID AudioChannelID;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#add25e560eadc585a0cb132025a08e1d7">   35</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> AudioChannelID <a class="code" href="struct_sifteo_1_1_audio_channel.html#add25e560eadc585a0cb132025a08e1d7" title="A reserved ID, used to mark undefined AudioChannels.">UNDEFINED</a> = _SYS_AUDIO_INVALID_CHANNEL_ID;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8">   38</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> AudioChannelID <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> = _SYS_AUDIO_MAX_CHANNELS;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a9bce5a5aaf89e7a1eb0f723dc3885475">   41</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> int32_t <a class="code" href="struct_sifteo_1_1_audio_channel.html#a9bce5a5aaf89e7a1eb0f723dc3885475" title="The maximum volume for an AudioChannel.">MAX_VOLUME</a> = _SYS_AUDIO_MAX_VOLUME;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0">   44</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0" title="Loop modes available for use in play()">LoopMode</a> {</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a3e4a76804c5310af8cdbbc501b725510">   45</a></span>&#160;        <a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a3e4a76804c5310af8cdbbc501b725510">UNDEF_LOOP</a> = _SYS_LOOP_UNDEF,       </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a36efd06d6d5cbd61d6bf1764abf96cf6">   46</a></span>&#160;        <a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a36efd06d6d5cbd61d6bf1764abf96cf6">ONCE</a> = _SYS_LOOP_ONCE,              </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0acd23158663eb96c3b3ae8559f528631c">   47</a></span>&#160;        <a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0acd23158663eb96c3b3ae8559f528631c">REPEAT</a> = _SYS_LOOP_REPEAT,          </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    };</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a0b441bdc83ae3bc396c7e4657771763a">   56</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_audio_channel.html#a0b441bdc83ae3bc396c7e4657771763a" title="Default constructor.">AudioChannel</a>() : sys(<a class="code" href="struct_sifteo_1_1_audio_channel.html#add25e560eadc585a0cb132025a08e1d7" title="A reserved ID, used to mark undefined AudioChannels.">UNDEFINED</a>)</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    {}</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#aac5b10271c20056fbdb23dacd3a6c9e5">   65</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_audio_channel.html#a0b441bdc83ae3bc396c7e4657771763a" title="Default constructor.">AudioChannel</a>(AudioChannelID <span class="keywordtype">id</span>) : sys(id)</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    {}</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a50bd08e0e3d418baa6b91d47572985ae">   72</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#a50bd08e0e3d418baa6b91d47572985ae" title="Initialize a channel by assignging it an ID.">init</a>(AudioChannelID <span class="keywordtype">id</span>)</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    {</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(<span class="keywordtype">id</span> &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel ID is invalid&quot;</span>);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        sys = id;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    }</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a22b9713a30f05ad739106c53f4dc700d">   83</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#a22b9713a30f05ad739106c53f4dc700d" title="Begin playback of a sample.">play</a>(<span class="keyword">const</span> <a class="code" href="struct_sifteo_1_1_asset_audio.html" title="An audio asset, using any supported compression codec.">AssetAudio</a> &amp;asset, <a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0" title="Loop modes available for use in play()">LoopMode</a> loopMode = <a class="code" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a3e4a76804c5310af8cdbbc501b725510">UNDEF_LOOP</a>)<span class="keyword"> const</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordflow">return</span> _SYS_audio_play(&amp;asset.sys, sys, (_SYSAudioLoopType) loopMode);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a0f502b90868d0665765d2ebf2f312b89">   92</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#a0f502b90868d0665765d2ebf2f312b89" title="Is this channel currently playing a sample?">isPlaying</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">return</span> _SYS_audio_isPlaying(sys);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#af7a314b557ae0e9d2d610c403a4f8554">  103</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#af7a314b557ae0e9d2d610c403a4f8554" title="Stop playback of the current sample.">stop</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        _SYS_audio_stop(sys);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    }</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#aa3cdbd0b622e862f3660fafbfde66910">  114</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#aa3cdbd0b622e862f3660fafbfde66910" title="Pause the currently playing sample in this channel.">pause</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        _SYS_audio_pause(sys);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    }</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a39ba92184207da67652c02b6fa56c594">  125</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#a39ba92184207da67652c02b6fa56c594" title="Resume playback on this channel.">resume</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        _SYS_audio_resume(sys);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#aed985544edfd48167cddba29e8630f33">  136</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#aed985544edfd48167cddba29e8630f33">setVolume</a>(<span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#a7b35b8235227b210d41db1ae1d7dcf28" title="Get the current volume for this channel.">volume</a>)<span class="keyword"> const</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        _SYS_audio_setVolume(sys, volume);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a075fb9a950a3a4aab9fe421f359731b8">  148</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#a075fb9a950a3a4aab9fe421f359731b8" title="Sets the speed of this channel, in samples per second.">setSpeed</a>(<span class="keywordtype">unsigned</span> hz)<span class="keyword"> const</span></div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        _SYS_audio_setSpeed(sys, hz);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_channel.html#a7b35b8235227b210d41db1ae1d7dcf28">  157</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_audio_channel.html#a7b35b8235227b210d41db1ae1d7dcf28" title="Get the current volume for this channel.">volume</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="keywordflow">return</span> _SYS_audio_volume(sys);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    }</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    uint32_t pos()<span class="keyword"> const</span></div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(sys &lt; <a class="code" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8" title="The maximum number of supported AudioChannels in the system.">NUM_CHANNELS</a> &amp;&amp; <span class="stringliteral">&quot;AudioChannel has invalid ID&quot;</span>);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="keywordflow">return</span> _SYS_audio_pos(sys);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    }</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;};</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html">  177</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_sifteo_1_1_audio_tracker.html" title="Playback interface for Tracker modules.">AudioTracker</a> {</div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#aad454645c2036b4405307503016915df">  182</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#aad454645c2036b4405307503016915df" title="Begin playback of a module.">play</a>(<span class="keyword">const</span> <a class="code" href="struct_sifteo_1_1_asset_tracker.html" title="A Tracker module, converted from XM format by stir">AssetTracker</a> &amp;asset) {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="keywordflow">return</span> _SYS_tracker_play(&amp;asset.song);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    }</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#a56436d9bb019583c864afe07508b3442">  189</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#a56436d9bb019583c864afe07508b3442" title="Resume playback of a paused module.">resume</a>() {</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <span class="keywordflow">return</span> _SYS_tracker_play(0);</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    }</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#aa837f02798ef7cb6d6459fcd32d3d0ce">  196</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#aa837f02798ef7cb6d6459fcd32d3d0ce" title="Pause playback of a module.">pause</a>() {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        _SYS_tracker_pause();</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#a06127ca549395e49b46a697a63fabd30">  205</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#a06127ca549395e49b46a697a63fabd30" title="Stop playback of the current module.">stop</a>() {</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        _SYS_tracker_stop();</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#a596b80f7c5627385eb4fec82ddec1350">  212</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#a596b80f7c5627385eb4fec82ddec1350" title="Is the tracker currently playing a module?">isStopped</a>() {</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keywordflow">return</span> _SYS_tracker_isStopped();</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    }</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#ae736f1a2693d5f2e051892fd44b85dad">  219</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#ae736f1a2693d5f2e051892fd44b85dad" title="Is the tracker currently playing a module?">isPaused</a>() {</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        <span class="keywordflow">return</span> _SYS_tracker_isPaused();</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    }</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div>
<div class="line"><a name="l00230"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#a5300488493833a774a3a953b432b615c">  230</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#a5300488493833a774a3a953b432b615c" title="Scale volume for current channel.">setVolume</a>(<span class="keywordtype">int</span> volume, _SYSAudioChannelID ch = -1)</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    {</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(volume &gt;= 0 &amp;&amp; volume &lt;= _SYS_AUDIO_MAX_VOLUME);</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        _SYS_tracker_setVolume(volume, ch);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    }</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div>
<div class="line"><a name="l00242"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#aa51a2db7ff83c8b3cb8ae809abbd0e1a">  242</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#aa51a2db7ff83c8b3cb8ae809abbd0e1a" title="Scale tempo for current song.">setTempoModifier</a>(<span class="keywordtype">int</span> modifier)</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    {</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(modifier &gt; -100);</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        _SYS_tracker_setTempoModifier(modifier);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    }</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div>
<div class="line"><a name="l00255"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_audio_tracker.html#a7c85d455cebc78f49169a60d89a8e518">  255</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="struct_sifteo_1_1_audio_tracker.html#a7c85d455cebc78f49169a60d89a8e518" title="Set play position for current song.">setPosition</a>(uint16_t phrase, uint16_t row)</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    {</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        _SYS_tracker_setPosition(phrase, row);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    }</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;};</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;} <span class="comment">// namespace Sifteo</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
